<?php

namespace common\entities\expcenter;

class ExpCenterEntity extends \common\entities\ConfigEntity {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'myscrm_exp_center';
    }

    public function rules() {
        return [
            [['username'], 'required', 'on' => 'save'],
            [['username'], 'string', 'max' => 30, 'on' => 'save'],
            [['username'], 'unique'],
            [['pwd'], 'required', 'on' => 'save'],
            [['pwd'], 'string', 'max' => 30, 'on' => 'save'],
            [['uid', 'status', 'created_on', 'modified_on'], 'integer', 'on' => 'save'],
            [['expired_time', 'created_by', 'modified_by'], 'safe', 'on' => 'save'],
        ];
    }

    public function attributeLabels() {
        return [
            "username" => "用户名",
            "pwd" => "密码",
            "status" => "status",
            "expired_time" => "过期时间",
            "created_on" => "created_on",
            "created_by" => "created_by",
            "modified_on" => "modified_on",
            "modified_by" => "modified_by"
        ];
    }

}
